package com.bdqn.repository;


import com.bdqn.pojo.SysUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UserRepository extends JpaRepository<SysUser, Integer>, JpaSpecificationExecutor<SysUser> {

//模糊查询

    List<SysUser> findByUsrNameLike(String name);

//    @Query("select u from SysUser u where u.usrRoleId = ?1")
//    List<SysUser> findByRoleId(Integer roleId);
//@Transactional(timeout = 10)
//    @Modifying
//    @Query("select u from SysUser u where u.usrRoleId = :roleId")
//    List<SysUser> findByRoleId(@Param("roleId") Integer roleId);

//     List<SysUser> findUserByName(String usrName);

     //分页查询
}
